<script type="text/javascript"> 
 
    $(document).ready(function(){ 
		// initialise Superfish 
        $("ul.sf-menu").superfish({ 
            pathClass:  'Dictionaries' 
        }); 
    }); 
 
</script>
	Dictionaries &nbsp;&nbsp;<a href="<?=APP_ROOT;?>/dictionaries/add">Add new</a><br />
	<br />
	<table cellpadding="2" cellspacing="3" class="list" >
		<thead>
			<td class = "listID" ><a href="<?=APP_ROOT;?>/dictionaries/index/orderBy:id<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'id') echo '/DESC:true';?>">ID</a></td>
			<td><a href="<?=APP_ROOT;?>/dictionaries/index/orderBy:key<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'key') echo '/DESC:true';?>">Key</a></td>
			<td><a href="<?=APP_ROOT;?>/dictionaries/index/orderBy:eng<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'eng') echo '/DESC:true';?>">English</a></td>			
			<td><a href="<?=APP_ROOT;?>/dictionaries/index/orderBy:rus<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'rus') echo '/DESC:true';?>">Russian</a></td>
			<td><a href="<?=APP_ROOT;?>/dictionaries/index/orderBy:arm<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'arm') echo '/DESC:true';?>">Armenian</a></td>
			<td><a href="<?=APP_ROOT;?>/dictionaries/index/orderBy:group<?php if(isset($orderBy) && !isset($DESC) && $orderBy == 'group') echo '/DESC:true';?>">Group</a></td>
			<td class = "listAction">Action</td>
		</thead>
		<? 
			$i=0;	
			foreach ($dictionaries as $dictionary){
				$i++;
				$id = $dictionary['Dictionary']['id'];
				$key = $dictionary['Dictionary']['key'];
				$eng = $dictionary['Dictionary']['eng'];
				$rus = $dictionary['Dictionary']['rus'];
				$arm = $dictionary['Dictionary']['arm'];
				$group = $dictionary['Dictionary']['group'];
		?>
		<tr class="<?php if($i%2) echo 'zuyg'; else echo 'kent';  ?>">
			<td class = "listID">
				<? echo $id; ?>
			</td>
			<td>
				<? echo $key; ?></td>			
			<td>
				<? echo $eng; ?></td>
			<td>
				<? echo $rus; ?></td>
			<td >
				<? echo $arm; ?></td>
			<td >
				<? echo $group; ?></td>
			<td class = "listAction">
				<a title="edit" href="<?=APP_ROOT;?>/dictionaries/edit/<?=$id?>" ><img src="<?=APP_ROOT;?>/img/icons/Colored/GIF/reply.gif" /></a>
				<a title="delete" onclick="javascript:del(<?php echo $id; ?>)" href="#" ><img src="<?=APP_ROOT;?>/img/icons/Colored/GIF/action_delete.gif" /></a>
			</td>
		</tr>
		<?
		}//for main products
		?>
	</table>
<script language="javascript" type="text/javascript">
function del(id){
	if (confirm("Are you sure?")) {
    	window.location.href = "<?=APP_ROOT;?>/dictionaries/delete/"+id;
	}
}
</script>